solution of pdes by separation of variables